package com.ruoyi.business.service.impl;

import com.ruoyi.business.domain.BusinessManualConfig;
import com.ruoyi.business.mapper.BusinessManualConfigMapper;
import com.ruoyi.business.service.IBusinessManualConfigService;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 手工交易参数配置Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-05-14
 */
@Service
public class BusinessManualConfigServiceImpl implements IBusinessManualConfigService
{
    @Autowired
    private BusinessManualConfigMapper businessManualConfigMapper;

    /**
     * 查询手工交易参数配置
     * 
     * @param id 手工交易参数配置主键
     * @return 手工交易参数配置
     */
    @Override
    public BusinessManualConfig selectBusinessManualConfigById(Long id)
    {
        return businessManualConfigMapper.selectBusinessManualConfigById(id);
    }

    /**
     * 查询手工交易参数配置列表
     * 
     * @param businessManualConfig 手工交易参数配置
     * @return 手工交易参数配置
     */
    @Override
    public List<BusinessManualConfig> selectBusinessManualConfigList(BusinessManualConfig businessManualConfig)
    {
        return businessManualConfigMapper.selectBusinessManualConfigList(businessManualConfig);
    }

    /**
     * 新增手工交易参数配置
     * 
     * @param businessManualConfig 手工交易参数配置
     * @return 结果
     */
    @Override
    public int insertBusinessManualConfig(BusinessManualConfig businessManualConfig)
    {
        businessManualConfig.setCreateTime(DateUtils.getNowDate());
        return businessManualConfigMapper.insertBusinessManualConfig(businessManualConfig);
    }

    /**
     * 修改手工交易参数配置
     * 
     * @param businessManualConfig 手工交易参数配置
     * @return 结果
     */
    @Override
    public int updateBusinessManualConfig(BusinessManualConfig businessManualConfig)
    {
        return businessManualConfigMapper.updateBusinessManualConfig(businessManualConfig);
    }

    /**
     * 批量删除手工交易参数配置
     * 
     * @param ids 需要删除的手工交易参数配置主键
     * @return 结果
     */
    @Override
    public int deleteBusinessManualConfigByIds(Long[] ids)
    {
        return businessManualConfigMapper.deleteBusinessManualConfigByIds(ids);
    }

    /**
     * 删除手工交易参数配置信息
     * 
     * @param id 手工交易参数配置主键
     * @return 结果
     */
    @Override
    public int deleteBusinessManualConfigById(Long id)
    {
        return businessManualConfigMapper.deleteBusinessManualConfigById(id);
    }
}
